﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UM_SERVER.Packet
{
    /// <summary>
    ///     协议簇枚举类
    /// </summary>
    public class Protocol
    {
        /// <summary>
        ///     网络协议簇
        /// </summary>
        public enum NetworkProtocol
        {
            /// <summary>
            ///     基本协议
            /// </summary>
            Base,
            /// <summary>
            ///     聊天协议
            /// </summary>
            TALK_MESSAGE,
            /// <summary>
            ///     视频协议
            /// </summary>
            VIDEO,
            /// <summary>
            ///     语音协议
            /// </summary>
            VOICE,
            /// <summary>
            ///     文件传送协议
            /// </summary>
            TRANSFER_FILE
        }

        /// <summary>
        ///     网络命令 [传入]
        /// </summary>
        public enum IN_NetworkCommand
        {
            /// <summary>
            ///     登陆包
            /// </summary>
            LOGIN_PACKAGE,
            /// <summary>
            ///     获得自身信息包
            /// </summary>
            GET_MYSELF_INFO_PACKAGE,
            // <summary>
            ///     获得分组包
            /// </summary>
            GET_GROUP_PACKAGE,
            // <summary>
            ///     获得指定分组中的好友包
            /// </summary>
            GET_FRIEND_BY_GROUP_PACKAGE,
            /// <summary>
            ///     获得指定好友信息包
            /// </summary>
            GET_FRIEND_INFO_PACKAGE,
            /// <summary>
            ///     修改用户个性签名包
            /// </summary>
            MODIFY_PROD_PACKAGE,
            /// <summary>
            ///     更新用户挂起信息包
            /// </summary>
            UPDATE_USER_CHANAGE,
            /// <summary>
            ///     更新用户登录状态请求包
            /// </summary>
            CHANAGE_USER_ONLINE_STATE_PACKAGE,
            /// <summary>
            ///     更新用户分组请求包
            /// </summary>
            UPDATE_ITEM_PACKAGE,
            /// <summary>
            ///     添加用户分组请求包
            /// </summary>
            ADD_NEW_ITEM_PACKAGE,
            /// <summary>
            ///     删除用户分组请求包
            /// </summary>
            DELETE_ITEM_PACKAGE,
            /// <summary>
            ///     获取要添加用户的信息请求包 
            /// </summary>
            GET_POST_FRIEND_INFO_PACKAGE,
            /// <summary>
            ///     添加好友请求包
            /// </summary>
            ADD_FRIEND,
             /// <summary>
            ///     添加好友结果包
            /// </summary>
            POST_ADD_FRIEND_RESULT_PAKCAGE,
            /// <summary>
            ///     删除好友请求包
            /// </summary>
            DELETE_FRIEND_PACKAGE,
            /// <summary>
            ///     用户心跳包
            /// </summary>
            HEART_BREATH_PACKAGE,
            /// <summary>
            ///     注册回馈包
            /// </summary>
            SIGN_PACKAGE,
            // <summary>
            ///     改变上线状态回馈包
            /// </summary>
            REPLY_STATE_PACKAGE,
            // <summary>
            ///     接收消息回馈包
            /// </summary>
            REPLY_TALK_PACKAGE,
            // <summary>
            ///     修改分组回馈包
            /// </summary>
            REPLY_CHANAGE_GROUP_PACKAGE,
            // <summary>
            ///     修改好友回馈包
            /// </summary>
            REPLY_CHANAGE_FRIEND_PACKAGE,
            // <summary>
            ///     添加好友回馈包
            /// </summary>
            REPLY_ADD_FRIEND_PACKAGE,
            // <summary>
            ///     添加分组回馈包
            /// </summary>
            REPLY_ADD_GROUP_PACKAGE,
            // <summary>
            ///     接收到消息后的成功回馈包
            /// </summary>
            REPLY_GET_MESSAGE,
            // <summary>
            ///     接收消息提示包
            /// </summary>
            REPLY_TRANSFER_FILE_NOTIFY,
            // <summary>
            ///     接收文件数据包
            /// </summary>
            REPLY_FILE_DATA,
            // <summary>
            ///     接收文件结束回馈包
            /// </summary>
            REPLY_TRANSFER_FILE_END
        }

        /// <summary>
        ///     网络命令 [输出]
        /// </summary>
        public enum OUT_NetworkCommand
        {
            /// <summary>
            ///     回馈登陆包
            /// </summary>
            REPLY_LOGIN_PACKAGE,
            /// <summary>
            ///     回馈获取自身信息请求包
            /// </summary>
            REPLY_GETMYSELFINFO_PACKAGE,
            /// <summary>
            ///     回馈获取分组信息请求包
            /// </summary>
            REPLY_GET_GROUPINFO_PACKAGE,
            /// <summary>
            ///     回馈获取指定分组内好友的请求包
            /// </summary>
            REPLY_GET_FRIENDINFO_BY_GROUPID_PACKAGE,
            /// <summary>
            ///     回馈获取指定用户详细信息的请求包
            /// </summary>
            REPLY_GET_FRIEND_INFO_PACKAGE,
            /// <summary>
            ///     回馈修改用户个性签名请求包
            /// </summary>
            REPLY_MODIFY_PROD_PACKAGE,
            /// <summary>
            ///     回馈修改用户挂起信息
            /// </summary>
            REPLY_UPDATE_USERINFO,
            /// <summary>
            ///     由于用户2次登陆，强制用户线下包
            /// </summary>
            SET_USER_OFFLINE,
            /// <summary>
            ///     回馈更改用户在线状态请求包
            /// </summary>
            REPLY_CHANAGE_USER_ONLINE_STATE_PACKAGE,
            /// <summary>
            ///     回复更新用户分组信息包
            /// </summary>
            REPLY_UPDATE_ITEM_PACKAGE,
            /// <summary>
            ///     回复添加用户分组信息包
            /// </summary>
            REPLY_ADD_NEW_ITEM_PACKAGE,
            /// <summary>
            ///     回复删除用户分组信息包
            /// </summary>
            REPLY_DELETE_NEW_ITEM_PACKAGE,
            /// <summary>
            ///     回复获取要添加好友信息请求包 - 没有找到该好友
            /// </summary>
            REPLY_GET_POST_FRIEND_INFO_NOT_FIND_PACKAGE,
            /// <summary>
            ///     回复获取要添加好友信息请求包
            /// </summary>
            REPLY_GET_POST_FRIEND_INFO,
            /// <summary>
            ///     转发添加好友申请
            /// </summary>
            REDIRECT_ADD_FRIEND_PACKAGE,
            /// <summary>
            ///     回馈添加好友结果已经收到
            /// </summary>
            REPLY_RETURN_POST_ADD_FRIEND_PACKAGE,
            /// <summary>
            ///     广播添加用户状态
            /// </summary>
            BOARDCAST_ADD_FRIEND,
            /// <summary>
            ///     广播用户上线消息
            /// </summary>
            BOARDCAST_USERONLINE_MESSAGE,
            /// <summary>
            ///     删除好友信息包
            /// </summary>
            DELETE_FRIEND,
            /// <summary>
            ///     回复用户心跳信息包
            /// </summary>
            REPLY_USER_HEART_BREATH_PACKAGE
        }

        /// <summary>
        ///     网络聊天协议 [传入]
        /// </summary>
        public enum TALK_IN_NetworkCommand : int
        {
            /// <summary>
            ///     完整聊天信息 [不分包]
            /// </summary>
            TOTAL_TALK_MESSAGE,
            /// <summary>
            ///     分包聊天信息
            /// </summary>
            DETACH_TALK_MESSAGE,
            /// <summary>
            ///     回馈成功接收聊天信息请求包
            /// </summary>
            REPLY_SUCESSFUL_TALK_MESSAGE,
            /// <summary>
            ///      提取图片
            /// </summary>
            REQUEST_PICTURE,
            /// <summary>
            ///     分包图片信息
            /// </summary>
            DETACH_IMAGE,
            /// <summary>
            ///     窗口抖动
            /// </summary>
            WINDOW_SHADOW,
            /// <summary>
            ///     回馈窗口抖动
            /// </summary>
            ACK_WAINDOW_SHADOW,
            /// <summary>
            ///     打洞请求
            /// </summary>
            DIG_A_HOLE,
            /// <summary>
            ///     打洞请求转发
            /// </summary>
            REDIRECT_HOLE,
            /// <summary>
            ///     打洞测试
            /// </summary>
            TEST_HOLE,
            /// <summary>
            ///     回馈服务器的打洞
            /// </summary>
            ACK_HOLE,
            /// <summary>
            ///     服务器回馈的打洞申请结果
            /// </summary>
            SERVER_ACK_HOLE
        }

        /// <summary>
        ///     网络聊天协议 [传入]
        /// </summary>
        public enum TALK_OUT_NetworkCommand : int
        {
            /// <summary>
            ///     完整聊天信息 [不分包]
            /// </summary>
            TOTAL_TALK_MESSAGE,
            /// <summary>
            ///     分包聊天信息
            /// </summary>
            DETACH_TALK_MESSAGE,
            /// <summary>
            ///      聊天消息回馈
            /// </summary>
            SUCESS_TALK_MESSAGE,
            /// <summary>
            ///      提取图片
            /// </summary>
            REQUEST_PICTURE,
            /// <summary>
            ///     分包图片信息
            /// </summary>
            DETACH_IMAGE,
            /// <summary>
            ///     窗口抖动
            /// </summary>
            WINDOW_SHADOW,
            /// <summary>
            ///     回馈窗口抖动
            /// </summary>
            ACK_WAINDOW_SHADOW,
            /// <summary>
            ///     打洞请求
            /// </summary>
            DIG_A_HOLE,
            /// <summary>
            ///     打洞请求转发
            /// </summary>
            REDIRECT_HOLE,
            /// <summary>
            ///     打洞测试
            /// </summary>
            TEST_HOLE,
            /// <summary>
            ///     回馈服务器的打洞
            /// </summary>
            ACK_HOLE,
            /// <summary>
            ///     服务器回馈的打洞申请结果
            /// </summary>
            SERVER_ACK_HOLE
        }

    }
}
